/* -----------------------------------------------------------------------
     _    _ _     _                 _    _                                
    / \  | | | __| |_ __  _ __  ___| | _(_)_ __  ___   ___ ___  _ __ ___  
   / _ \ | | |/ _` | '_ \| '_ \/ __| |/ / | '_ \/ __| / __/ _ \| '_ ` _ \ 
  / ___ \| | | (_| | | | | | | \__ \   <| | | | \__ \| (_| (_) | | | | | |
 /_/   \_\_|_|\__,_|_| |_|_| |_|___/_|\_\_|_| |_|___(_)___\___/|_| |_| |_|

 The Name Of Skin: AllDnnSkins Technology
 Publish Date: February 5, 2010
 Contact Information: contact@alldnnskins.com
 Copyright by Alldnnskins.com. All Rights Reserved

----------------------------------------------------------------------- */

function TextPrompt(targetdiv,textvalue) {
	if (!document.getElementById) return false;
	if (!document.getElementsByTagName) return false;
	if (!document.getElementById(targetdiv)) return false;
	var search = document.getElementById(targetdiv);
	var searchText = search.getElementsByTagName("input");
	for (i=0; i<searchText.length; i++) {
		if (searchText[i].getAttribute("type") == "text") {
			searchText[i].value = textvalue;
			searchText[i].onfocus = function() {
				if (this.value == textvalue) {
					this.value = "";
				}
			}
			searchText[i].onblur = function() {
				if (this.value == "") {
					this.value = textvalue;
				}
			}
		}
	}
}
TextPrompt("search","search|");


